package com.lz.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.print.attribute.HashAttributeSet;

/**工作单位表
 * @author 徐建林
 * @date 2018/10/21 14:02
 */
@Data
@Entity
@Table
public class Unit implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = 4648292919680524839L;
	@Id
    @GeneratedValue(generator = "native")
    @GenericGenerator(name = "native",strategy = "native")
    /**工作单位id*/
    private Integer unitId;
    /**工作单位名称*/
    private  String unitName;
    /**薪资发放水平*/
    private String payMoney;
    /**公司流动金额*/
    private String flowMoney;
    @OneToMany(targetEntity=Customer.class,mappedBy="unit")
    private Set<Customer> customerSet = new HashSet<>();
}
